package com.mask.roll.edu.client;

import com.mask.roll.common.util.RollResponse;
import com.mask.roll.edu.client.impl.VodFileDegradeFeignClient;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 远程调用vod服务接口
 * @author hx
 * @since 2021/10/25 11:05 下午
 */
@FeignClient(name = "service-vod",fallback = VodFileDegradeFeignClient.class)
@Component
public interface VodClient {

    /**
     *
     * @param id PathVariable一定要指定名称
     * @return
     */
    @DeleteMapping("/vod/video/delete/{id}")
    @ApiOperation("删除视频")
    public RollResponse deleteVod(@PathVariable("id") String id);


    @DeleteMapping("/vod/video/delete/match")
    @ApiOperation(value = "删除多个视频")
    public RollResponse deleteVodBatch(@ApiParam(name = "listId",value = "视频id",required = true)
                              @RequestParam("listId") List<String> listId);
}
